import Icon from '@/components/Icon'
import styles from './index.module.scss'

console.log('a')

const CommentFooter = ({type = 'normal', onShowComment, onCollected, is_collect, attitude, onLike, showCommentPopup, total_count}) => {
  return (
    <div className={styles.root}>
      <div className="input-btn" onClick={showCommentPopup}>
        <Icon type="iconbianji"/>
        <span>抢沙发</span>
      </div>

      {type === 'normal' && (
        <>
          <div className="action-item" onClick={onShowComment}>
            <Icon type="iconbtn_comment"/>
            <p>评论</p>
            {total_count && <span className="bage">{total_count}</span>}
          </div>
          <div className="action-item" onClick={onLike}>
            <Icon type={attitude === 1 ? 'iconbtn_like_sel' : 'iconbtn_like2'}/>
            <p>点赞</p>
          </div>
          <div className="action-item" onClick={onCollected}>
            <Icon type={is_collect ? 'iconbtn_collect_sel' : 'iconbtn_collect'}/>
            <p>收藏</p>
          </div>
        </>
      )}

      {type === 'reply' && (
        <div className="action-item">
          <Icon type={true ? 'iconbtn_like_sel' : 'iconbtn_like2'}/>
          <p>点赞</p>
        </div>
      )}

      <div className="action-item">
        <Icon type="iconbtn_share"/>
        <p>分享</p>
      </div>
    </div>
  )
}

export default CommentFooter
